﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YouTravel.Framework.Enums;

namespace YouTravel.ViewModels
{
    public class BranchViewModel
	{
		/// <summary>
		/// 机构ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 机构名称
		/// </summary>
		public string Name{get;set;}
		/// <summary>
		/// 机构类型
		/// </summary>
		public int Type { get; set; }
		/// <summary>
		/// 专线毛利率
		/// </summary>
		public decimal GrossMargin { get; set; }
		/// <summary>
		/// 付款手续费率
		/// </summary>
		public decimal CounterFeeRate{get;set;}
		/// <summary>
		/// 允许欠款总额
		/// </summary>
		public decimal ArrearsTotal{get;set;}
		/// <summary>
		/// 允许欠票周期
		/// </summary>
		public int OweTicketsDay { get; set; }

		/// <summary>
		/// 扣款名称
		/// </summary>
		public List<BranchDeduction> LstDeduction { get; set; }
		/// <summary>
		/// 发票名称
		/// </summary>
		public List<BranchInvoice> LstInvoice { get; set; }
		/// <summary>
		/// 收票名称
		/// </summary>
		public List<BranchCollectInvoice> LstCollectInvoice { get; set; }

		/// <summary>
		/// 扣款名称集合‘-’分割
		/// </summary>
		public string Deduction { get; set; }
		/// <summary>
		/// 发票名称集合‘-’分割
		/// </summary>
		public string Invoice { get; set; }
		/// <summary>
		/// 收票名称集合‘-’分割
		/// </summary>
		public string CollectInvoice { get; set; }

		/// <summary>
		/// 操作人ID
		/// </summary>
		public int OperatorID { get; set; }
		/// <summary>
		/// 操作人名称
		/// </summary>
		public string OperatorName { get; set; }
		/// <summary>
		/// 操作日期
		/// </summary>
		public DateTime OptionTime { get; set; }

        /// <summary>
        /// 机构状态
        /// 1-正常 0-已冻结
        /// </summary>
        public bool Status { get; set; }
	}

	/// <summary>
	/// 扣款类型
	/// </summary>
	public class BranchDeduction {
		/// <summary>
		/// 扣款ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 扣款名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 扣款状态
		/// </summary>
		public bool Status { get; set; }
	}
	/// <summary>
	/// 发票名称
	/// </summary>
	public class BranchInvoice
	{
		/// <summary>
		/// 发票ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 发票名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 扣款状态
		/// </summary>
		public bool Status { get; set; }
	}
	/// <summary>
	/// 收票名称
	/// </summary>
	public class BranchCollectInvoice
	{
		/// <summary>
		/// 收票ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 收票名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 扣款状态
		/// </summary>
		public bool Status { get; set; }
	}

	public class BranchListViewModel {
		/// <summary>
		/// 机构ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 机构名称（最大值50）
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 机构类型
		/// </summary>
		public BranchType Type { get; set; }
		/// <summary>
		/// 机构状态
		/// 1-正常 0-已冻结
		/// </summary>
		public bool Status { get; set; }
		/// <summary>
		/// 创建人ID
		/// </summary>
		public int CreaterId { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreateTime { get; set; }
		/// <summary>
		/// 更新人ID
		/// </summary>
		public int? UpdaterId { get; set; }
		/// <summary>
		/// 
		/// 更新人姓名
		/// </summary>
		public string UpdaterName { get; set; }
		/// <summary>
		/// 更新时间
		/// </summary>
		public DateTime? UpdateTime { get; set; }
	}
}
